#ifndef CGI_COMMENT_H
#define CGI_COMMENT_H

#include <utils/dbapi.h>

enum {
    CMT_COL_BLOG,
    CMT_COL_GUEST,
    CMT_COL_IP,
    CMT_COL_CONTENT,
    CMT_COL_CREATED_TIME,
    CMT_COL_ACTIVE,
    CMT_COL_NUM
};

#define CMT_CONTENT_LEN (800*3)
#define CMT_COLNAME_BLOG "blog"
#define CMT_COLNAME_CREATED_TIME "created time"

int get_comments(int blog_id, db_result_t *result);
void cgi_add_comment(holyreq_t *req);
void cgi_del_comment(holyreq_t *req);
void init_comment(void);

#endif // CGI_COMMENT_H
